#include <bitset>

#include <openssl/bn.h>
#include <openssl/ec.h>

bool VerifyEcdsa0(
    const EC_GROUP* group,
    const EC_POINT* public_key,
    const EC_POINT* generator,
    const BIGNUM* z,
    const BIGNUM* curve_order,
    const BIGNUM* upper_bound,
    const std::pair<BIGNUM*, BIGNUM*>& sig);

std::string SignEcdsa0(
    const EC_GROUP* group,
    const EC_POINT* public_key,
    const EC_POINT* generator,
    const BIGNUM* privkey,
    const BIGNUM* z,
    const BIGNUM* curve_order,
    const BIGNUM* upper_bound,
    const bool verify);
